package dz.common;

public class CodeTool {
	static PbeCoder pbeCoder = new PbeCoder();


	public static String encode(String mingwen) {
        pbeCoder.setPassword("201305");
        String afterEnCode = "";
		try {
			afterEnCode = pbeCoder.encode(mingwen);
		} catch (Exception e) {
			e.printStackTrace();
		}
        return afterEnCode;

	}
	
	public static String decode(String miwen) {
        pbeCoder.setPassword("201305");
        String afterEnCode = "";
		try {
			afterEnCode = pbeCoder.decode(miwen);
		} catch (Exception e) {
			e.printStackTrace();
		}
        return afterEnCode;
	}

}
